import Vue from "vue";
import FastClick from "fastclick";
import VueLazyLoad from "vue-lazyload";

import toast from "components/common/toast";

import App from "./App.vue";
import router from "./router";
import store from "./store";

Vue.config.productionTip = false;

// 添加事件总线
Vue.prototype.$bus = new Vue();

// 安装toast插件
Vue.use(toast);
// 安装vue-lazyload插件
Vue.use(VueLazyLoad, {
  loading: require("./assets/img/common/loading.gif")
});

// 解决移动端300ms延迟
FastClick.attach(document.body);

new Vue({
  el: "#app",
  router,
  store,
  render: h => h(App)
});
